local NODES = {
	{80,require("Web"),0}
}
-------------------------------------------------------------------------

function GetPorts()
	return NODES;
end
-------------------------------------------------------------------------

function Initialize()
	for i,v in ipairs(NODES) do
		v[2].Initialize()
	end
	return true;
end

function Release()
	for i,v in ipairs(NODES) do
		v[2].Release()
	end
	return true;
end

function OnConnect(fd,port)
	for i,v in ipairs(NODES) do
		if port == v[1] then
			return v[2].OnConnect(fd)
		end
	end
	return false;
end

function OnRecv(fd,port,data,len)
	for i,v in ipairs(NODES) do
		if port == v[1] then
			return v[2].OnRecv(fd,data,len)
		end
	end
	return -1;
end

function OnDisconnect(fd,port)
	for i,v in ipairs(NODES) do
		if port == v[1] then
			return v[2].OnDisconnect(fd)
		end
	end
	return false;
end

